home *** CD-ROM | disk | FTP | other *** search
- #ifndef __SCANDRV_H__
- #define __SCANDRV_H__
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*
- * scandrv.h
- *
- * Functions for scanner driver writers
- *
- * Copyright 1992, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
- * Inc.; the contents of this file may not be disclosed to third
- * parties, copied or duplicated in any form, in whole or in part,
- * without the prior written permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to
- * restrictions as set forth in subdivision (c)(1)(ii) of the Rights
- * in Technical Data and Computer Software clause at DFARS
- * 252.227-7013, and/or in similar or successor clauses in the FAR,
- * DOD or NASA FAR Supplement. Unpublished - rights reserved under the
- * Copyright Laws of the United States.
- */
-
- #ident "$Revision: 1.13 $"
-
- #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
-
- /*
- * Command dispatch stuff
- */
- typedef struct tag_scarg {
- void *data;
- int len;
- } SCARG;
-
- typedef struct tag_scres {
- void *data;
- int len;
- void *freeparam;
- void (*free)(void *param, void *data);
- int errno;
- char *errMsg;
- } SCRES;
-
- typedef void (*SCANFUNC)(int cmd, SCARG *arg, SCRES *res);
-
- void SCDriverSetCallbacks(SCANFUNC *funcs, int nfuncs,
- SCANFUNC *opts, int nopts);
- int SCDriverMainLoop(void);
- int SCDriverPutRow(void *row, int size);
- int SCDriverInit(char *arenaFile);
- int SCDriverPutStatus(SCSTATUS *status, char *driverMessage);
- int SCDriverInitChild(void);
- void SCDriverSyncFunction(void (*func)(void *), void *param);
- void SCDriverStopWriter(int writerPid);
- int SCDriverSendEvent(SCEVENT *event);
-
- /*
- * Queue stuff
- */
- struct tag_scqueue;
-
- typedef struct tag_scqueue SCQUEUE;
-
- SCQUEUE * SCCreateQueue(int nelems);
- int SCDestroyQueue(SCQUEUE *q);
- int SCQueueLength(SCQUEUE *q);
- void SCEnqueue(SCQUEUE *q, void *data);
- void * SCDequeue(SCQUEUE *q);
- void SCUnblockQueue(SCQUEUE *q);
- void SCQdebug(SCQUEUE *q, char *pfx);
- void SCQueueClearWait(SCQUEUE *q);
- void SCQueueSetExit(SCQUEUE *q);
-
- #endif /* C || C++ */
-
- #ifdef __cplusplus
- }
- #endif
- #endif /* !__SCANDRV_H__ */
-